import request from '@/utils/request'

export function getOperatorPage(search) {
    return request({
        url: 'Operator/GetPageList',
        method: 'post',
        data: search
    })
}

export function validateAccount(account) {
    return request({
        url: 'Operator/ValidateOperatorByAccount',
        method: 'get',
        params: { account: account }
    })
}

export function validateCard(card) {
    return request({
        url: 'Operator/ValidateOperatorByCard',
        method: 'get',
        params: { card: card }
    })
}

export function OperatorAdd(operator) {
    return request({
        url: 'Operator/AddOperator',
        method: 'post',
        data: operator
    })
}

export function GetOperatorByCard(card) {
    return request({
        url: 'Operator/GetOperatorByCard',
        method: 'get',
        params: { card: card }
    })
}

export function UptOperator(operator) {
    return request({
        url: 'Operator/UptOperator',
        method: 'post',
        data: operator
    })
}

export function DelOperator(card) {
    return request({
        url: 'Operator/DelOperator',
        method: 'get',
        params: { card: card }
    })
}

export function UptStateByCard(card) {
    return request({
        url: 'Operator/UptStateByCard',
        method: 'get',
        params: { card: card }
    })
}

export function DelOperatorList(keys) {
    return request({
        url: 'Operator/DelOperatorList',
        method: 'get',
        params: { keys: keys }
    })
}

export function GetRoles() {
    return request({
        url: 'Operator/GetRoles',
        method: 'get'
    })
}

export function GetEmployees() {
    return request({
        url: 'Operator/GetEmployees',
        method: 'get'
    })
}